# cmake -G Ninja [-DCMAKE_BUILD_TYPE=Release/Debug] ..
# cmake -G "Unix Makefiles" [-DCMAKE_BUILD_TYPE=Release/Debug] ..

cmake_minimum_required(VERSION 3.22.1)
project(DDZ_Server)
set(CMAKE_CXX_STANDARD 17)


# 添加头文件目录要写在添加子目录的上方(add_subdirectory)
include_directories(
    ${PROJECT_SOURCE_DIR}/common
    ${PROJECT_SOURCE_DIR}/http
    ${PROJECT_SOURCE_DIR}/reactor
    ${PROJECT_SOURCE_DIR}/tcp
    ${PROJECT_SOURCE_DIR}/thread
)

# 添加子目录
add_subdirectory(common)
add_subdirectory(http)
add_subdirectory(reactor)
add_subdirectory(tcp)
add_subdirectory(thread)

link_libraries(
    tcp
    http
    reactor
    thread
    common
)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
add_executable(DDZ_Server main.cpp)